"use strict"

/**
 * 海南省国家税务局采购网爬虫
 *  
 */

var Base = require("./base");
var hn_spider = new Base();
hn_spider.name = "海南省国家税务局采购网";
hn_spider.page = 1;

hn_spider.getPageUrl = function (pg) {
    return "http://www.hitax.gov.cn/xxgk_2_4/";
};

hn_spider.getItems = function ($) {
    var items = [];
    var td_length = $(".list_table tr").length;
    for (var i = 0; i < td_length - 1; i++) {
        var e = $(".list_table tr td").eq(4 * i + 1).children();
        var item = {};
        item.title = e.text();
        item.url = "http://www.hitax.gov.cn" + e.attr("href");
        item.source = hn_spider.name;
        items.push(item);
    }
    return items;
};

exports = module.exports = hn_spider;